package main
import (
    "fmt"
    "encoding/json"
)

type Student struct {
	Id string
	Name string
	Age int
	Gender string
	Sno string
}

func main() {
	var s1 = Student{
		Id: "001",
		Name: "张三",
		Age: 18,
		Gender: "男",
		Sno: "S0001",
	}
	fmt.Printf("%#v\n", s1)
	jsonByte, _ := json.Marshal(s1)
	jsonStr := string(jsonByte)
	fmt.Println(jsonStr)
}